package com.sy.olddriver.model;

import com.sy.olddriver.annotation.Controller;
import com.sy.olddriver.annotation.RequestMapping;
import com.sy.olddriver.annotation.ResponseBody;
import com.sy.olddriver.dto.RootCategory;
import com.sy.olddriver.entity.Category;
import com.sy.olddriver.service.CategoryService;
import com.sy.olddriver.service.impl.CategoryServiceImpl;

import java.util.List;

@Controller
@RequestMapping("category")
public class CategoryModel {
    private CategoryService categoryService = new CategoryServiceImpl();

    @RequestMapping("getCategoryInfo")
    @ResponseBody
    public List<RootCategory> getCategoryInfo() {
        return categoryService.getCategoryInfo();
    }
}
